package com.xr.mapper;

import com.github.pagehelper.Page;
import com.xr.pojo.Role;
import com.xr.pojo.RoleExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {

    //添加系统角色和权限信息的关系
    void AddRolePermission(@Param("roleId") Integer roleId, @Param("PermissionIds") Integer [] PermissionIds);

    //分页加条件查询
    Page<Role> selectByFindString(String findString);

    long countByExample(RoleExample example);

    int deleteByExample(RoleExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Role record);

    int insertSelective(Role record);

    List<Role> selectByExample(RoleExample example);

    Role selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Role record, @Param("example") RoleExample example);

    int updateByExample(@Param("record") Role record, @Param("example") RoleExample example);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);
}